%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Component Diagram
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Component diagram of the overall system}


The component diagram of the overall SAB system can be seen in figure \ref{fig:ADD_Final_componentdiag} on page \pageref{fig:ADD_Final_componentdiag}. We separated this component diagram into seven sections to provide a clear overview.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Data Storage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Data Storage}
The Data Storage section is shown in red on the overall component diagram. This section is responsible for storing all customer information. The facades provides some key abstractions to access the information and to keep the system modifiable for the future.

The \emph{Transaction Database} and \emph{Balance Database} are responsible for storing processed transactions and bank account balances and work very close together with the Transaction Processing section. 

The \emph{Notification Inbox} stores all notification messages and has an easy to use \emph{Send Notification} abstraction that allows other components to easily send notifications to customers.

The \emph{Account Database} stores all remaining customer information. All customer data that needs to be read by other components is made available through the \emph{Customer Information} facade to provide a common interface.





%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Transaction Processing
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Transaction Processing}
The Transaction Processing section is shown in yellow on the diagram. This section is responsible for processing transactions correctly and on time. The internal components of the \emph{Transaction Processing System} provide the ability to process transactions concurrently and scheduled according to their priority. Transactions are abstracted as transaction commands which can execute any functionality involving reading and updating bank account balances and the transaction history, and sending out messages.

All data access is done through a special \emph{TPS Facade} abstraction that provides the necessary functionality to read and update the stored transactions and bank account balances.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SWIFT Communication
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{SWIFT Communication}
The SWIFT Communication section, shown in green, provides correct and timely processing of interbank an POS communications via SWIFT. The \emph{SWIFT Communication} component provides the functionality to send and receive SWIFT messages via the SWIFT network.

Messages coming from POS terminals are translated by the \emph{POS System}. Messages coming from other banks are translated by the \emph{Interbank Transaction System}. These messages are routed to the Transaction Processing section to be processed as transactions.

Outgoing transaction replies coming from the Transaction Processing section are translated to the appropriate SWIFT message and send out over the SWIFT network.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SAB Modules
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{SAB Modules}
The SAB Modules, shown in magenta, is an aggregation of modules which provide the core functionalities of the SAB System. These modules provide the ability for customers to set up direct debits and standing orders, the ability for SAB to pay out interests, initiate fraud detection and block bank cards, and the ability for users and employees to log in to their user accounts.



%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Employee Application
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Employee Application}
The Employee Application section, shown in blue, is a front end which allows bank clerks to use the SAB system to register and help customers. It also allows the SAB CFO to update the interest rates.




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Customer Application
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Customer Application}
The Customer Application section, shown in orange, provides the requirement for SAB customers to access certain functionalities to applications like the existing \emph{SAB Online} and the upcoming SAB Mobile. The \emph{ATM System} provides the same functionalities to the customers.

Basic customer functionalities are abstracted by \emph{SAB App Functionalities} which provides a common interface for many functions and allows the system to be easily extended with new front ends.




%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Operator
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsubsection{Operator}
The Operator section, shown in cyan, fulfill the monitoring requirements for the SAB system. It connects with all internal component monitors and can notify the \emph{Operator} in case of a critical component fails or a deadline is missed.




\begin{figure}[!ht]
    \centering
        \includegraphics[angle=90, width=1.03\textwidth]{images/ADD_Final_componentdiag.png}
    \caption{Component diagram of the overall system.}
    \label{fig:ADD_Final_componentdiag}
\end{figure}